<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<script type="text/javascript">
(function(){
	
})();
</script>
<script type="text/javascript" src="<%=basePath%>backgroundManager/js/tempPrice.js"></script>
<form id="pagerForm" method="post" action="<%=basePath%>price_findPrices.action"> <!-- 此action指定的是排序、分页所提交的action -->
	<input type="hidden" name="status" value="${param.status}">
	<input type="hidden" name="keywords" value="${param.keywords}" />
	<input type="hidden" name="pageNum" value="${requestScope.pageNum}" />
	<input type="hidden" name="numPerPage" value="${model.numPerPage}" />
	<input type="hidden" name="orderField" value="${param.orderField}" />
	<input type="hidden" name="orderDirection" value="${param.orderDirection}" />
	<!-- 存放查询条件 -->
	<%--<input name="channelNum" type="hidden" value="${requestScope.channelNum}" />
	<input name="priceSeachBean.channelName" type="hidden" value="${requestScope.priceSeachBean.channelName}" />
	<input name="priceSeachBean.startPartitionNumber" type="hidden" value="${requestScope.priceSeachBean.startPartitionNumber}" />
	<input name="priceSeachBean.startDate" type="hidden" value="${requestScope.priceSeachBean.startDate}" />
	<input name="priceSeachBean.endDate" type="hidden" value="${requestScope.priceSeachBean.endDate}" />
	<input name="priceSeachBean.type" type="hidden" value="${requestScope.priceSeachBean.type}" />
	<input name="priceSeachBean.status" type="hidden" value="${requestScope.priceSeachBean.status}" />
--%></form>

<div class="pageHeader">
	<form name="findTempPriceForm" onsubmit="return navTabSearch(this);" action="<%=basePath%>tempPrice_findTempPrices.action?numPerPage=10&pageNum=1&orderField=P_TEMP_ID&orderDirection=asc" method="post">
	<div class="searchBar">
				<div class="pageFormContent1">
					<p>
					<label width="50">客户编码：</label>
					<input id="customerNum_te" type="text" name="priceSeachBean.channelName" size="13" readonly="readonly" />
					<input id="searchCustomer_te" type="button" value="..." />
					</p>
					<p>
					<label width="50">供应商编码：</label>
					<input id="supplierNum_te" type="text" name="priceSeachBean.channelName" size="13" readonly="readonly"  />
					<input id="searchSupplier_te" type="button" value="..." />
					</p>
					<p>
				    <label>起始省：</label>
					<select id="sProvince_te" style="width: 100px;" name="priceSeachBean.startPartitionNumber" >
					<option value="" selected>全部</option>
					</select>
					</p>
					<p>
					<label>起始市：</label>
					<select style="width: 100px;" name="priceSeachBean.startPartitionNumber" >
					<option value="" selected>全部</option>
					</select>
					</p>
					<p>
					<label>目的国家：</label>
					<input type="text" />
					</p>
					<p>
				    <label>目的省：</label>
					<select id="e_province_te" style="width: 100px;" name="priceSeachBean.startPartitionNumber" >
					<option value="" selected>全部</option>
					</select>
					</p>
					<p>
					<label>目的市：</label>
					<select id="e_city_te" style="width: 100px;" name="priceSeachBean.startPartitionNumber" >
					<option value="" selected>全部</option>
					</select>
					</p>
				</div>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">&nbsp;&nbsp;&nbsp;查&nbsp;&nbsp;询&nbsp;&nbsp;&nbsp;</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<%=basePath%>backgroundManager/pricemanager/Price/addPrice.jsp?pageNum=1&numPerPage=10&orderField=P_CHANNEL_NUMBER&orderDirection=asc" target="navTab" title="添加临时报价" rel="addPrice"><span>添加临时报价</span></a></li>
			<li><a class="delete" href="#" posttype="string" rel="ids" target="selectedTodo" title="确定要删除吗?"><span>删除临时报价</span></a></li>
			<li><a class="edit" href="#?priceID={sid_user}" target="navTab" rel="previewPrice"><span>临时报价详细</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="demo/common/dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="194">
		<thead>
			<tr>
				<th width="30"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="120" orderField="ORDER_CUSTOMER_NUMBER" class="${requestScope.orderDirection}">客户名称</th>
				<th width="100" orderField="P_CHANNEL_NUMBER" class="${requestScope.orderDirection}">供应商名称</th>
				<th width="75">起始地址</th>
				<th width="80">目的国家</th>
				<th width="80">目的地址</th>
				<th width="80"orderField="P_TEMP_MATERIAL" class="${requestScope.orderDirection}">材重</th>
				<th width="80"orderField="P_TEMP_WEIGHT" class="${requestScope.orderDirection}">实重</th>
				<th width="60"orderField="P_TEMP_AGING" class="${requestScope.orderDirection}">时效</th>
				<th width="80">报价1</th>
				<th width="80">报价2</th>
				<th width="80">报价日期</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${requestScope.tempPriceLise}" var="tempPrice">
			<tr target="sid_user" rel="${tempPrice.tempPriceId}">
				<td><input name="ids" value="${tempPrice.tempPriceId}" type="checkbox"></td>
				<td>${tempPrice.customersName}</td>
				<td>${tempPrice.supplierName}</td>
				<td>${tempPrice.saddress}</td>
				<td>${tempPrice.ecountryName}</td>
				<td>${tempPrice.eaddress}</td>
				<td>${tempPrice.material}</td>
				<td>${tempPrice.weight}</td>
				<td>${tempPrice.aging}</td>
				<td>${tempPrice.amount1}</td>
				<td>${tempPrice.amount2}</td>
				<td>${tempPrice.addDate}</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select id="countSelect" class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})"  >
				<option value="10">10</option>
				<option value="50">50</option>	
				<option value="100">100</option>
			</select>
			<span>条，共${requestScope.totalRecords}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="${requestScope.totalRecords}" numPerPage="${requestScope.pageSize}" pageNumShown="${requestScope.totalPages}" currentPage="${requestScope.pageNum }"></div>

	</div>
</div>
<script type="text/javascript">
	(function () {
		var a = document.getElementById("countSelect");
		switch(${requestScope.numPerPage}){
			case 10:
				a.options.selectedIndex = 0;
				break;
			case 50:
				a.options.selectedIndex = 1;
				break;
			case 100:
				a.options.selectedIndex = 2;
				break;
		}
	})();
</script>